<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <ul>
        <li v-for="(item, i) in list" :key="i">{{ item }}</li>
      </ul>

      <button @click="fn">btn</button>
    </div>

    <script src="./vue.js"></script>
    <script>
      Vue.createApp({
        data() {
          return {
            list: [1, 2, 3, 4, 5],
          };
        },
        methods: {
          fn() {
            this.list.push(9);
          },
        },
      }).mount("#app");
    </script>
  </body>
</html>
